<!-- 订单列表 -->
<section class="orders">
<div class="order-detail" ng-repeat="order in orders">
    <table class="table ngCart cart-table">
        <thead>
        <tr>
            <td class="check-cell">
                <span> 订单号: {{order.short_id}}
                </span>
            </td>
            <td></td>
            <td class="detail-cell">订单详情</td>
        </tr>
        </thead>

        <tbody>
        <tr ng-repeat="entry in order.entries track by $index">

            <td class="img-cell">
                <div>
                    <img ng-src="{{entry.spec.images[0]}}">
                </div>
            </td>
            <td class="info-cell">
                <div>{{ entry.item.title }}</div>
                <div>
                    <span ng-repeat="(k, v) in entry.spec.attributes">
                        {{ngCart.attrMap[k]}}: {{v}}
                    </span>
                </div>
                <div class="btn-group cart-btn">
                    <span>数量: {{ entry.quantity | number }}</span>
                </div>
            </td>
            <td class="price-cell">{{ entry.amount_usd | currency }}</td>
        </tr>
        </tbody>

        <tfoot>
        <tr>
            <td></td>
            <td class="fee-cell">运费: </td>
            <td class="price-cell">{{ order.cn_shipping | currency }}</td>
        </tr>
        <tr>
            <td class="status-cell" ng-show="order.payment_status=='PAID'">已付款</td>
            <td class="status-cell" ng-hide="order.payment_status=='PAID'">
                <button class="btn checkout-btn" ng-click="goCheckout(order.id)">去付款</button>
            </td>
            <td class="fee-cell">总计: </td>
            <td class="price-cell">{{ order.final | currency }}</td>
        </tr>
        </tfoot>
    </table>
</div>
</section>
